package org.code.mallspringboot.service.impl;

import org.code.mallspringboot.mapper.PmsSkuMapper;
import org.code.mallspringboot.pojo.PmsSkuStock;
import org.code.mallspringboot.service.PmsSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PmsSkuServiceImpl implements PmsSkuService {


    @Autowired
    private PmsSkuMapper pmsSkuMapper;

    @Override
    public List<PmsSkuStock> selectByIdAndKeyword(int id, String keyword) {
        return pmsSkuMapper.selectByIdAndKeyword(id, keyword);
    }

    @Override
    public int update(int productId, String skuCode, double price, Integer stock, Integer lowStock) {
        return pmsSkuMapper.update(productId, skuCode, price, stock, lowStock);
    }
}
